\documentclass[a4paper,spanish] {article} 

\usepackage [spanish] {babel} 
\usepackage [utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caratula}
\usepackage{ulem} 
\usepackage{mr-diagrama}
\usepackage{listings}
\usepackage{enumerate}
\usepackage{enumitem}


%enumitem config
\newlist{longenum}{enumerate}{5}
\setlist[longenum,1]{label=\arabic*)}
\setlist[longenum,2]{label=\alph*)}
\setlist[longenum,3]{label=\roman*)}
\setlist[longenum,4]{label=(\arabic*)}
\setlist[longenum,5]{label=(\alph*)}


%paragraph config
\parindent = 0 pt
\parskip = 11 pt


\pagestyle{headings}


\addtolength{\oddsidemargin}{-1in}
\addtolength{\textwidth}{2in}

%caratula config
\materia{Bases de datos}
\submateria{Primer Cuatrimestre del 2012}
\titulo{Trabajo Pr\'actico 1: MER, MR, SQL}
\integrante{Nicol\'as Papagna}{424/03}{nicolas.papagna@gmail.com}
\integrante{Mariano Semelman}{143/08}{ marianosemelman@gmail.com}

\begin{document}
\maketitle
\newpage

\tableofcontents
\newpage

\section{MER}
	\begin{figure}[ht!]
		\includegraphics[angle=90,width=11cm]{img/mer.png}
		\label{fig:der}
	\end{figure}
\newpage


\subsection{Decisiones tomadas}
\input{decisiones}

\subsection{Restricciones adicionales}
\input{restricciones}


\section{MR}

\subsection{Esquema}
\input{esquema-mr}


\section{SQL}

\subsection{Stored Procedures}
		\lstinputlisting{sql/procedures.sql}

		\bigskip
		\bigskip
\subsection{Triggers}
		\lstinputlisting{sql/triggers.sql}
		
		\newpage
\subsection{Diseño Físico}
		
		\begin{figure}[ht!]
			\noindent\hspace*{-1cm}\includegraphics[width=\textwidth]{img/model.png}
			\label{fig:fisico}
		\end{figure}
		
		\lstinputlisting{sql/structure.sql}

\end{document}
